<?php
declare(strict_types=1);

namespace App\Http\Controllers\Article;

use App\Http\Controllers\Controller;
use App\Http\Requests\Article\ArticleCateUidValidate;
use App\Http\Requests\Article\ArticleContentUidValidate;
use App\Library\Response;
use App\Logic\User\Service\Article\ArticleContentService;
use Illuminate\Http\JsonResponse;

class ArticleContentController extends Controller
{
    public function list(ArticleCateUidValidate $validate): JsonResponse
    {
        return Response::success((new ArticleContentService())->serviceSelect(request()->all()));
    }

    public function content(ArticleContentUidValidate $validate): JsonResponse
    {
        return Response::success((new ArticleContentService())->serviceFind(request()->all()));
    }
}
